<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<script type="text/javascript">
<c:choose> 
<c:when test="${dlgFlag==1}">
	$("#lookup-data-table").bootstrapTable();
</c:when>
<c:otherwise>
	$("#data-table").bootstrapTable();
	function del(id){
		$("#data-table").bootstrapTable('del',id);
	}
	$('.date-range').each(function(){$(this).daterangepicker()});
</c:otherwise>
</c:choose>
if ($.fn.suggest) $("input[searchClass]").suggest();
if ($.fn.lookupback) $("span[lookupUrl]").lookupback();

//validate form
$("form.required-validate").each(function(){
	$(this).validate({
		focusInvalid: false,
		focusCleanup: true,
		errorElement: "span",
		ignore:".ignore",
		invalidHandler: function(form, validator) {
			var errors = validator.numberOfInvalids();
			alert("有"+errors+"个错误，请检查核对！");
		}
	});
});

</script>
